Skip to content

fix(motion_velocity_planner_common): suppress maybe-uninitialized warning on NVIDIA DRIVE AGX Thor#877

Merged
veqcc merged 2 commits intoautowarefoundation:mainfrom
veqcc:fix/maybe-uninitialized-on-aarch64
Mar 6, 2026
Merged

fix(motion_velocity_planner_common): suppress maybe-uninitialized warning on NVIDIA DRIVE AGX Thor#877
veqcc merged 2 commits intoautowarefoundation:mainfrom
veqcc:fix/maybe-uninitialized-on-aarch64

Conversation

@veqcc
Copy link
Contributor

@veqcc veqcc commented Mar 3, 2026

Description

Suppressed maybe-uninitialized warnings.
This error is happening inside boost libraries, which means we cannot avoid the error by explicitly initializing variables.

The whole error message on NVIDIA DRIVE AGX Thor devkit looks as follows:

--- stderr: autoware_motion_velocity_planner_common                                 
In lambda function,
    inlined from ‘_Funct std::for_each(_IIter, _IIter, _Funct) [with _IIter = __gnu_cxx::__normal_iterator<const boost::geometry::model::polygon<autoware_utils_geometry::Point2d>*, vector<boost::geometry::model::polygon<autoware_utils_geometry::Point2d>, allocator<boost::geometry::model::polygon<autoware_utils_geometry::Point2d> > > >; _Funct = autoware::motion_velocity_planner::filter_by_multi_trajectory_polygon(const pcl::PointCloud<pcl::PointXYZ>::Ptr&, const std::vector<boost::geometry::model::polygon<autoware_utils_geometry::Point2d>, std::allocator<boost::geometry::model::polygon<autoware_utils_geometry::Point2d> > >&)::<lambda(const autoware::motion_velocity_planner::Polygon2d&)>]’ at /usr/include/c++/13/bits/stl_algo.h:3833:5,
    inlined from ‘pcl::PointCloud<pcl::PointXYZ>::Ptr autoware::motion_velocity_planner::filter_by_multi_trajectory_polygon(const pcl::PointCloud<pcl::PointXYZ>::Ptr&, const std::vector<boost::geometry::model::polygon<autoware_utils_geometry::Point2d>, std::allocator<boost::geometry::model::polygon<autoware_utils_geometry::Point2d> > >&)’ at /home/autoware/autoware/src/core/autoware_core/planning/motion_velocity_planner/autoware_motion_velocity_planner_common/src/planner_data.cpp:157:16:
/home/autoware/autoware/src/core/autoware_core/planning/motion_velocity_planner/autoware_motion_velocity_planner_common/src/planner_data.cpp:163:34: error: ‘bbox.boost::geometry::model::box<boost::geometry::model::point<double, 2, boost::geometry::cs::cartesian> >::m_min_corner.boost::geometry::model::point<double, 2, boost::geometry::cs::cartesian>::m_values[0]’ may be used uninitialized [-Werror=maybe-uninitialized]
  163 |       rtree.query(bgi::intersects(bbox), std::back_inserter(result_s));
      |                   ~~~~~~~~~~~~~~~^~~~~~
/home/autoware/autoware/src/core/autoware_core/planning/motion_velocity_planner/autoware_motion_velocity_planner_common/src/planner_data.cpp: In function ‘pcl::PointCloud<pcl::PointXYZ>::Ptr autoware::motion_velocity_planner::filter_by_multi_trajectory_polygon(const pcl::PointCloud<pcl::PointXYZ>::Ptr&, const std::vector<boost::geometry::model::polygon<autoware_utils_geometry::Point2d>, std::allocator<boost::geometry::model::polygon<autoware_utils_geometry::Point2d> > >&)’:
/home/autoware/autoware/src/core/autoware_core/planning/motion_velocity_planner/autoware_motion_velocity_planner_common/src/planner_data.cpp:159:36: note: ‘bbox.boost::geometry::model::box<boost::geometry::model::point<double, 2, boost::geometry::cs::cartesian> >::m_min_corner.boost::geometry::model::point<double, 2, boost::geometry::cs::cartesian>::m_values[0]’ was declared here
  159 |       bg::model::box<BoostPoint2D> bbox;
      |                                    ^~~~
In lambda function,
    inlined from ‘_Funct std::for_each(_IIter, _IIter, _Funct) [with _IIter = __gnu_cxx::__normal_iterator<const boost::geometry::model::polygon<autoware_utils_geometry::Point2d>*, vector<boost::geometry::model::polygon<autoware_utils_geometry::Point2d>, allocator<boost::geometry::model::polygon<autoware_utils_geometry::Point2d> > > >; _Funct = autoware::motion_velocity_planner::filter_by_multi_trajectory_polygon(const pcl::PointCloud<pcl::PointXYZ>::Ptr&, const std::vector<boost::geometry::model::polygon<autoware_utils_geometry::Point2d>, std::allocator<boost::geometry::model::polygon<autoware_utils_geometry::Point2d> > >&)::<lambda(const autoware::motion_velocity_planner::Polygon2d&)>]’ at /usr/include/c++/13/bits/stl_algo.h:3833:5,
    inlined from ‘pcl::PointCloud<pcl::PointXYZ>::Ptr autoware::motion_velocity_planner::filter_by_multi_trajectory_polygon(const pcl::PointCloud<pcl::PointXYZ>::Ptr&, const std::vector<boost::geometry::model::polygon<autoware_utils_geometry::Point2d>, std::allocator<boost::geometry::model::polygon<autoware_utils_geometry::Point2d> > >&)’ at /home/autoware/autoware/src/core/autoware_core/planning/motion_velocity_planner/autoware_motion_velocity_planner_common/src/planner_data.cpp:157:16:
/home/autoware/autoware/src/core/autoware_core/planning/motion_velocity_planner/autoware_motion_velocity_planner_common/src/planner_data.cpp:163:34: error: ‘bbox.boost::geometry::model::box<boost::geometry::model::point<double, 2, boost::geometry::cs::cartesian> >::m_min_corner.boost::geometry::model::point<double, 2, boost::geometry::cs::cartesian>::m_values[1]’ may be used uninitialized [-Werror=maybe-uninitialized]
  163 |       rtree.query(bgi::intersects(bbox), std::back_inserter(result_s));
      |                   ~~~~~~~~~~~~~~~^~~~~~
/home/autoware/autoware/src/core/autoware_core/planning/motion_velocity_planner/autoware_motion_velocity_planner_common/src/planner_data.cpp: In function ‘pcl::PointCloud<pcl::PointXYZ>::Ptr autoware::motion_velocity_planner::filter_by_multi_trajectory_polygon(const pcl::PointCloud<pcl::PointXYZ>::Ptr&, const std::vector<boost::geometry::model::polygon<autoware_utils_geometry::Point2d>, std::allocator<boost::geometry::model::polygon<autoware_utils_geometry::Point2d> > >&)’:
/home/autoware/autoware/src/core/autoware_core/planning/motion_velocity_planner/autoware_motion_velocity_planner_common/src/planner_data.cpp:159:36: note: ‘bbox.boost::geometry::model::box<boost::geometry::model::point<double, 2, boost::geometry::cs::cartesian> >::m_min_corner.boost::geometry::model::point<double, 2, boost::geometry::cs::cartesian>::m_values[1]’ was declared here
  159 |       bg::model::box<BoostPoint2D> bbox;
      |                                    ^~~~
In lambda function,
    inlined from ‘_Funct std::for_each(_IIter, _IIter, _Funct) [with _IIter = __gnu_cxx::__normal_iterator<const boost::geometry::model::polygon<autoware_utils_geometry::Point2d>*, vector<boost::geometry::model::polygon<autoware_utils_geometry::Point2d>, allocator<boost::geometry::model::polygon<autoware_utils_geometry::Point2d> > > >; _Funct = autoware::motion_velocity_planner::filter_by_multi_trajectory_polygon(const pcl::PointCloud<pcl::PointXYZ>::Ptr&, const std::vector<boost::geometry::model::polygon<autoware_utils_geometry::Point2d>, std::allocator<boost::geometry::model::polygon<autoware_utils_geometry::Point2d> > >&)::<lambda(const autoware::motion_velocity_planner::Polygon2d&)>]’ at /usr/include/c++/13/bits/stl_algo.h:3833:5,
    inlined from ‘pcl::PointCloud<pcl::PointXYZ>::Ptr autoware::motion_velocity_planner::filter_by_multi_trajectory_polygon(const pcl::PointCloud<pcl::PointXYZ>::Ptr&, const std::vector<boost::geometry::model::polygon<autoware_utils_geometry::Point2d>, std::allocator<boost::geometry::model::polygon<autoware_utils_geometry::Point2d> > >&)’ at /home/autoware/autoware/src/core/autoware_core/planning/motion_velocity_planner/autoware_motion_velocity_planner_common/src/planner_data.cpp:157:16:
/home/autoware/autoware/src/core/autoware_core/planning/motion_velocity_planner/autoware_motion_velocity_planner_common/src/planner_data.cpp:163:34: error: ‘bbox.boost::geometry::model::box<boost::geometry::model::point<double, 2, boost::geometry::cs::cartesian> >::m_max_corner.boost::geometry::model::point<double, 2, boost::geometry::cs::cartesian>::m_values[0]’ may be used uninitialized [-Werror=maybe-uninitialized]
  163 |       rtree.query(bgi::intersects(bbox), std::back_inserter(result_s));
      |                   ~~~~~~~~~~~~~~~^~~~~~
/home/autoware/autoware/src/core/autoware_core/planning/motion_velocity_planner/autoware_motion_velocity_planner_common/src/planner_data.cpp: In function ‘pcl::PointCloud<pcl::PointXYZ>::Ptr autoware::motion_velocity_planner::filter_by_multi_trajectory_polygon(const pcl::PointCloud<pcl::PointXYZ>::Ptr&, const std::vector<boost::geometry::model::polygon<autoware_utils_geometry::Point2d>, std::allocator<boost::geometry::model::polygon<autoware_utils_geometry::Point2d> > >&)’:
/home/autoware/autoware/src/core/autoware_core/planning/motion_velocity_planner/autoware_motion_velocity_planner_common/src/planner_data.cpp:159:36: note: ‘bbox.boost::geometry::model::box<boost::geometry::model::point<double, 2, boost::geometry::cs::cartesian> >::m_max_corner.boost::geometry::model::point<double, 2, boost::geometry::cs::cartesian>::m_values[0]’ was declared here
  159 |       bg::model::box<BoostPoint2D> bbox;
      |                                    ^~~~
In lambda function,
    inlined from ‘_Funct std::for_each(_IIter, _IIter, _Funct) [with _IIter = __gnu_cxx::__normal_iterator<const boost::geometry::model::polygon<autoware_utils_geometry::Point2d>*, vector<boost::geometry::model::polygon<autoware_utils_geometry::Point2d>, allocator<boost::geometry::model::polygon<autoware_utils_geometry::Point2d> > > >; _Funct = autoware::motion_velocity_planner::filter_by_multi_trajectory_polygon(const pcl::PointCloud<pcl::PointXYZ>::Ptr&, const std::vector<boost::geometry::model::polygon<autoware_utils_geometry::Point2d>, std::allocator<boost::geometry::model::polygon<autoware_utils_geometry::Point2d> > >&)::<lambda(const autoware::motion_velocity_planner::Polygon2d&)>]’ at /usr/include/c++/13/bits/stl_algo.h:3833:5,
    inlined from ‘pcl::PointCloud<pcl::PointXYZ>::Ptr autoware::motion_velocity_planner::filter_by_multi_trajectory_polygon(const pcl::PointCloud<pcl::PointXYZ>::Ptr&, const std::vector<boost::geometry::model::polygon<autoware_utils_geometry::Point2d>, std::allocator<boost::geometry::model::polygon<autoware_utils_geometry::Point2d> > >&)’ at /home/autoware/autoware/src/core/autoware_core/planning/motion_velocity_planner/autoware_motion_velocity_planner_common/src/planner_data.cpp:157:16:
/home/autoware/autoware/src/core/autoware_core/planning/motion_velocity_planner/autoware_motion_velocity_planner_common/src/planner_data.cpp:163:34: error: ‘bbox.boost::geometry::model::box<boost::geometry::model::point<double, 2, boost::geometry::cs::cartesian> >::m_max_corner.boost::geometry::model::point<double, 2, boost::geometry::cs::cartesian>::m_values[1]’ may be used uninitialized [-Werror=maybe-uninitialized]
  163 |       rtree.query(bgi::intersects(bbox), std::back_inserter(result_s));
      |                   ~~~~~~~~~~~~~~~^~~~~~
/home/autoware/autoware/src/core/autoware_core/planning/motion_velocity_planner/autoware_motion_velocity_planner_common/src/planner_data.cpp: In function ‘pcl::PointCloud<pcl::PointXYZ>::Ptr autoware::motion_velocity_planner::filter_by_multi_trajectory_polygon(const pcl::PointCloud<pcl::PointXYZ>::Ptr&, const std::vector<boost::geometry::model::polygon<autoware_utils_geometry::Point2d>, std::allocator<boost::geometry::model::polygon<autoware_utils_geometry::Point2d> > >&)’:
/home/autoware/autoware/src/core/autoware_core/planning/motion_velocity_planner/autoware_motion_velocity_planner_common/src/planner_data.cpp:159:36: note: ‘bbox.boost::geometry::model::box<boost::geometry::model::point<double, 2, boost::geometry::cs::cartesian> >::m_max_corner.boost::geometry::model::point<double, 2, boost::geometry::cs::cartesian>::m_values[1]’ was declared here
  159 |       bg::model::box<BoostPoint2D> bbox;
      |                                    ^~~~
cc1plus: all warnings being treated as errors
gmake[2]: *** [CMakeFiles/autoware_motion_velocity_planner_common_lib.dir/build.make:90: CMakeFiles/autoware_motion_velocity_planner_common_lib.dir/src/planner_data.cpp.o] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:157: CMakeFiles/autoware_motion_velocity_planner_common_lib.dir/all] Error 2
gmake: *** [Makefile:146: all] Error 2
---
Failed   <<< autoware_motion_velocity_planner_common [15.9s, exited with code 2]

Related links

Parent Issue:

  • Link

How was this PR tested?

I have confirmed that the build success on Thor.

Notes for reviewers

The compiler version is

$ g++ --version
g++ (Ubuntu 13.3.0-6ubuntu2~24.04) 13.3.0

Interface changes

None.

Effects on system behavior

None.

…ning on NVIDIA DRIVE AGX Thor

Signed-off-by: Ryuta Kambe <ryuta.kambe@tier4.jp>
@veqcc veqcc self-assigned this Mar 3, 2026
@github-actions
Copy link

github-actions bot commented Mar 3, 2026

Thank you for contributing to the Autoware project!

🚧 If your pull request is in progress, switch it to draft mode.

Please ensure:

@veqcc veqcc added the run:build-and-test-differential Mark to enable build-and-test-differential workflow. (used-by-ci) label Mar 3, 2026
@codecov
Copy link

codecov bot commented Mar 3, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 50.13%. Comparing base (fd7f25b) to head (15e3be5).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #877      +/-   ##
==========================================
- Coverage   50.43%   50.13%   -0.30%     
==========================================
  Files         372      354      -18     
  Lines       23141    22481     -660     
  Branches    10264     9926     -338     
==========================================
- Hits        11671    11271     -400     
+ Misses      10349    10143     -206     
+ Partials     1121     1067      -54     
Flag Coverage Δ *Carryforward flag
daily-humble 50.65% <ø> (-0.08%) ⬇️ Carriedforward from 184b136
daily-jazzy 50.09% <ø> (-0.13%) ⬇️ Carriedforward from 184b136
differential-humble 9.89% <ø> (?)
differential-jazzy 9.91% <ø> (?)
total 50.38% <ø> (+<0.01%) ⬆️ Carriedforward from 184b136
total-humble 50.63% <ø> (+0.05%) ⬆️ Carriedforward from 184b136
total-jazzy 50.10% <ø> (+0.03%) ⬆️ Carriedforward from 184b136

*This pull request uses carry forward flags. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@veqcc veqcc removed the run:build-and-test-differential Mark to enable build-and-test-differential workflow. (used-by-ci) label Mar 3, 2026
@soblin
Copy link
Contributor

soblin commented Mar 3, 2026

@veqcc BTW, what's the compiler version ?

@veqcc
Copy link
Contributor Author

veqcc commented Mar 3, 2026

@soblin

what's the compiler version ?

It's 13.3, which I think is the default version on Ubuntu 24.04.

$ g++ --version
g++ (Ubuntu 13.3.0-6ubuntu2~24.04) 13.3.0

@veqcc
Copy link
Contributor Author

veqcc commented Mar 3, 2026

I am sorry that we have to wait the following two PRs to be merged in order to pass GitHub CIs.

@veqcc veqcc added the run:build-and-test-differential Mark to enable build-and-test-differential workflow. (used-by-ci) label Mar 6, 2026
@veqcc veqcc merged commit 81fa0f2 into autowarefoundation:main Mar 6, 2026
33 of 36 checks passed
@veqcc
Copy link
Contributor Author

veqcc commented Mar 6, 2026

Although the clang-tidy CI raises errors here, this is not related to the current changes and I will merge it.

clang-tidy-18 -export-fixes /tmp/tmposfh1qej/tmppkeajb90.yaml -p=build/ /__w/autoware_core/autoware_core/planning/motion_velocity_planner/autoware_motion_velocity_planner_common/test/test_collision_checker.cpp
clang-tidy-18 -export-fixes /tmp/tmposfh1qej/tmpz6n27tvk.yaml -p=build/ /__w/autoware_core/autoware_core/planning/motion_velocity_planner/autoware_motion_velocity_planner_common/src/planner_data.cpp
/__w/autoware_core/autoware_core/planning/motion_velocity_planner/autoware_motion_velocity_planner_common/src/planner_data.cpp:309:11: error: unchecked access to optional value [bugprone-unchecked-optional-access,-warnings-as-errors]
  309 |   return *lon_vel_relative_to_traj;
      |           ^
/__w/autoware_core/autoware_core/planning/motion_velocity_planner/autoware_motion_velocity_planner_common/src/planner_data.cpp:318:11: error: unchecked access to optional value [bugprone-unchecked-optional-access,-warnings-as-errors]
  318 |   return *lat_vel_relative_to_traj;
      |           ^

@veqcc veqcc deleted the fix/maybe-uninitialized-on-aarch64 branch March 6, 2026 00:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

run:build-and-test-differential Mark to enable build-and-test-differential workflow. (used-by-ci)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants